<template>
  <div>
    <div>
      <h1>欢迎进入管理系统首页,{{loginName}}</h1>
      <div v-if="loginName" style="float: right">
        <router-link :to="{name:'Login'}">退出登录</router-link>
      </div>
      <div v-if="!loginName"style="float: right">
        <router-link :to="{name:'Login'}">立即登录</router-link>
      </div>
    </div>
    <a href="#/index/deptList">部门管理</a>
    <a href="#/index/userList" >用户管理</a>
    <a href="#/index/orderList">订单管理</a>

    <router-view></router-view>

  </div>
</template>

<script>
export default {
  name: "index",
  data() {
    return {
      loginName: ''
    }
  },
  created() {
    this.loginName = this.$route.query.loginName;
  }
}
</script>

<style scoped>

</style>
